/*
 * INDEXWRITER.h
 *
 *  Created on: 29/10/2011
 *      Author: diego
 */

using namespace std;
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include "codigosDelta.h"
#include "Registros.h"
#include "BitWriter.h"
#include "FrontCoding.h"
#include "Configuracion.h"
#include "Constantes.h"

#ifndef INDEXWRITER_H_
#define INDEXWRITER_H_

class IndexWriter {
private:
	ofstream* indice;
	ofstream* terminos;
	BitWriter* docs;
	ofstream* header;

	int cont_registros;

	FrontCoding* compresorTerminos;

public:
	IndexWriter(string prefijo, int n);
	IndexWriter(int n);
	void write(super_reg* reg);
	void close();
	virtual ~IndexWriter();
};

#endif /* INDEXWRITER_H_ */
